//导入vue
import Vue from 'vue'

//1.1 导入路由相关的包
import VueRouter from 'vue-router'

//1.2安装路由
Vue.use(VueRouter)



import './filters.js'




//配置vue-resource
import VueResource from 'vue-resource'
//安装VueResource
Vue.use(VueResource)
//这是全局配置，请求根路径的，必须放到VueResoutce 注册之后
Vue.http.options.root = 'http://vue.studyit.io';
//全局配置post 提交时候，的表单数据类型为application/x-www-form-urlencoded
Vue.http.options.emulateJSON = true;

//按需导入自己需要的mintui组件
import {Header,Swipe,SwipeItem,Button} from 'mint-ui' 

//使用vue.componet注册header组件
Vue.component(Header.name,Header)
//注册轮播图相关的组件
Vue.component(Swipe.name, Swipe);
Vue.component(SwipeItem.name, SwipeItem);
//注册按钮
Vue.component(Button.name, Button);
//导入mui的样式表
import './lib/mui/css/mui.min.css'

//导入扩展的字体图标
import './lib/mui/css/icons-extra.css'

//导入App根组件
import app from './App.vue'


//导入路由
import router from './router.js'


var  vm = new Vue({
    el:'#app',
   
    render:c=>c(app), 
    
    router  //挂载路由对象
})